#!/bin/bash

while true; do
  sleep 3
  if ! $(echo lsblk -lno MOUNTPOINT|grep -q "printer_data/gcodes/usbdrive"); then
	sudo mount "/dev/"$(lsblk | grep 'part' | grep -o -e 'sd[a-z][0-9]*') /home/umeko/printer_data/gcodes/usbdrive
  fi
done
